home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / win / wtext.h < prev   
C/C++ Source or Header  |  1993-09-15  |  3KB  |  98 lines

  1. /*
  2.  * $Id: wtext.h%v 3.50 1993/07/09 05:35:24 woo Exp $
  3.  */
  4.  
  5. /* GNUPLOT - win/wtext.h */
  6. /*
  7.  * Copyright (C) 1992   Russell Lang
  8.  *
  9.  * Permission to use, copy, and distribute this software and its
  10.  * documentation for any purpose with or without fee is hereby granted, 
  11.  * provided that the above copyright notice appear in all copies and 
  12.  * that both that copyright notice and this permission notice appear 
  13.  * in supporting documentation.
  14.  *
  15.  * Permission to modify the software is granted, but not the right to
  16.  * distribute the modified code.  Modifications are to be distributed 
  17.  * as patches to released version.
  18.  *  
  19.  * This software is provided "as is" without express or implied warranty.
  20.  * 
  21.  *
  22.  * AUTHORS
  23.  * 
  24.  *   Russell Lang
  25.  * 
  26.  * Send your comments or suggestions to 
  27.  *  info-gnuplot@dartmouth.edu.
  28.  * This is a mailing list; to join it send a note to 
  29.  *  info-gnuplot-request@dartmouth.edu.  
  30.  * Send bug reports to
  31.  *  bug-gnuplot@dartmouth.edu.
  32.  */
  33.  
  34. /* redefine functions that can talk to tty devices, to use 
  35.  * implementation in winmain.c/wgnuplot.dll */
  36.  
  37. #define kbhit()  MyKBHit()
  38. #define getche() MyGetChE()
  39. #define getch()  MyGetCh()
  40. #define putch(ch)  MyPutCh(ch)
  41.  
  42. #define fgetc(file) MyFGetC(file)
  43. #undef  getchar
  44. #define getchar()   MyFGetC(stdin)
  45. #undef  getc
  46. #define getc(file)  MyFGetC(file)
  47. #define fgets(str,sz,file)  MyFGetS(str,sz,file)
  48. #define gets(str)          MyGetS(str)
  49.  
  50. #define fputc(ch,file) MyFPutC(ch,file)
  51. #undef  putchar
  52. #define putchar(ch)    MyFPutC(ch,stdout)
  53. #undef  putc
  54. #define putc(ch,file)  MyFPutC(ch,file)
  55. #define fputs(str,file)  MyFPutS(str,file)
  56. #define puts(str)        MyPutS(str)
  57.  
  58. #define fprintf MyFPrintF
  59. #define printf MyPrintF
  60.  
  61. #define fwrite(ptr, size, n, stream) MyFWrite(ptr, size, n, stream)
  62. #define fread(ptr, size, n, stream) MyFRead(ptr, size, n, stream)
  63.  
  64. /* now cause errors for some unimplemented functions */
  65.  
  66. #define vprintf dontuse_vprintf
  67. #define vfprintf dontuse_vfprintf
  68. #define fscanf dontuse_fscanf
  69. #define scanf dontuse_scanf
  70. #define clreol dontuse_clreol
  71. #define clrscr dontuse_clrscr
  72. #define gotoxy dontuse_gotoxy
  73. #define wherex dontuse_wherex
  74. #define wherey dontuse_wherey
  75. #define cgets dontuse_cgets
  76. #define cprintf dontuse_cprintf
  77. #define cputs dontuse_cputs
  78. #define cscanf dontuse_cscanf
  79. #define ungetch dontuse_ungetch
  80.  
  81. /* now for the prototypes */
  82.  
  83. int MyPutCh(int ch);
  84. int MyKBHit(void);
  85. int MyGetCh(void);
  86. int MyGetChE(void);
  87. int MyFGetC(FILE *file);
  88. char * MyGetS(char *str);
  89. char * MyFGetS(char *str, unsigned int size, FILE *file);
  90. int MyFPutC(int ch, FILE *file);
  91. int MyFPutS(char *str, FILE *file);
  92. int MyPutS(char *str);
  93. int MyFPrintF(FILE *file, char *fmt, ...);
  94. int MyPrintF(char *fmt, ...);
  95. size_t MyFWrite(const void *ptr, size_t size, size_t n, FILE *stream);
  96. size_t MyFRead(void *ptr, size_t size, size_t n, FILE *stream);
  97.  
  98.